package com.zs.demo.status;

import com.zs.demo.common.response.IResponseStatus;
import com.zs.demo.common.util.BussinessCode;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

/* @Desc: 登陆-响应状态码
 * @author:zhengs
 * @Time: 2018/11/20 10:07
 * @Copyright: © zhengs 版权所有  
 * @Warning: 本内容仅限于本公司内部传阅,禁止外泄或用于其它商业目的
 */
@AllArgsConstructor
public enum LoginStatus implements IResponseStatus {
    LOGIN_OK(200,"登录成功"),
    LOGOUT_OK(200,"退出成功"),
    LOGIN_ACCOUNT_FAIL(BussinessCode.LOGIN +1,"账户或密码错误"),
    LOGIN_FAIL(BussinessCode.LOGIN +2,"登录失败"),
    LOGOUT_FAIL(BussinessCode.LOGIN +3,"退出失败"),
    LOGIN_ACCOUNT_EMPTY(BussinessCode.LOGIN +4,"账户或密码不能为空"),
    LOGIN_UN_LOGIN(BussinessCode.LOGIN +5,"用户未登录，请先登录！"),
    LOGIN_UN_AUTH(BussinessCode.LOGIN +6,"请求方式不合法，禁止访问！"),
    LOGIN_EXPIRE(BussinessCode.LOGIN +7,"用户已失效，请重新登录！"),
    LOGIN_NO_RIGHT(BussinessCode.LOGIN +8,"用户无权限，请检查权限！"),
    LOGIN_RELOAD_RIGHT_FAIL(BussinessCode.LOGIN +9,"重新加载权限失败");

    public Integer code;

    public String msg;

    public Integer getStatus(){
        return this.code;
    }

    public String getMsg(){
        return this.msg;
    }
}
